1. Field of the Invention
The present invention relates to an image processing apparatus and an image processing method for digital image processing performed in consonance with an output image size, and a program therefor.
2. Description of the Related Art
Since digital cameras have become popular, and services at photo print shops are now available for which photographs are used in the production of CD-ROMs, users can easily obtain digital image data. Further, since the home use of high-quality image printers has spread, and multi-function color printing systems are now installed in photo print shops, even in convenience stores, there has been a dramatic increase in the opportunities afforded users to employ the available environment to display/print digital images.
In this situation, wherein images having various sizes are distributed and displayed/printed, the expansion and reduction processes are required. In addition, since for images photographed by users the exposure, focusing and color balance tend to be inappropriate, image restoration, such as is performed during the picture printing process, is also required.
However, as the number of pixels provided for a digital still camera is increased, an image restoration process that requires an especially complicated image analysis imposes a very large load. Further, the expansion/reduction process must employ, to a degree, a high quality image method in order to clearly display/print an image obtained using a large number of pixels. Because of these factors, an extended period of time is required to clearly display/print an digital image.
To solve this problem, a relevant technique is available whereby the order in which editing processes, such as the reduction and color conversion processes, are performed is changed, in accordance with the type of editing that must be performed, to reduce the number of pixels that must be processed as disclosed in JP-A-5-207266.
Another technique is available whereby a reduction process is performed first when an output image size is smaller than an input image size, or an expansion process is performed later when the output image size is larger than the input image size, so that the required amount of processing memory can be reduced, and the processing speed can be increased as disclosed in JP-A-2002-199208.
The objective of the technique in JP-A-2000-199208 is to reduce the amount of processing memory and to increase the processing speed merely by performing the reduction process first, when the output image size is smaller, and by performing the expansion process later, when the output image size is greater. However, the following problems occur when the nearest neighbor method, which is the most common expansion/reduction method, is employed, and when an image is comparatively large, such as a size L, and is to be printed by a printer by which the resolution is increased even more. Since to obtain an enlarged image the pixels are merely expanded, for a flat portion, the borders between blocks composed of pixels having the same value are noticeable and an angular impression is provided, and for an edge portion, the linear edges are step shaped and have a jagged appearance, so that the image quality is poor.
And when image reduction is performed, jaggies occur and further deteriorate the image quality. To eliminate these problems, high quality image expansion/reduction methods, such as a bi-linear interpolation method and a cubic convolution method, have been proposed, and when one of these methods is employed for the processing, a preferable image quality can be expected.
However, for index printing for which many images having reduced sizes are laid out for a single sheet and printed, the processing speed is reduced because high quality image expansion/reduction is unnecessarily performed, even when the image quality defect is almost unnoticeable.
The same problems are encountered during the image restoration process. That is, since the same process is performed as is used to output a large image, depending on the size of an output image, the processing speed is reduced even when there is no discernible difference in the image quality.
As is described above, as the objective of this method, the order in which of the expansion/reduction process and the image restoration process is changed while taking into account only an increase or decrease in the number of pixels in an image, and a processing order is selected that increases the processing speed and saves memory. However, as described above, since no consideration is given as to whether there is any discernible difference in the quality of an image thus generated, either a poor quality image is generated, or an unnecessary high quality image process is performed that causes a reduction in the processing speed.